           package com.java.diagnostics.visualizer.impl.preferences;
           
           import com.java.diagnostics.visualizer.data.DataSet;
           import java.rmi.server.UID;
           import org.eclipse.core.runtime.IPath;
           import org.eclipse.core.runtime.Platform;
           import org.eclipse.core.runtime.preferences.IEclipsePreferences;
           import org.eclipse.core.runtime.preferences.IPreferencesService;
           import org.eclipse.core.runtime.preferences.IScopeContext;
           import org.osgi.service.prefs.Preferences;
           
           public class DataSetScope
             implements IScopeContext
           {
             private static final String DATASET = "dataset";
             private final String uid;
           
             public DataSetScope(DataSet dataset)
             {
               if (dataset != null)
                 this.uid = dataset.getUID().toString();
               else
                 this.uid = null;
             }
           
             public IPath getLocation()
             {
               return null;
             }
           
             public String getName() {
               return "dataset";
             }
           
             public IEclipsePreferences getNode(String qualifier) {
               if (qualifier == null) {
                 throw new IllegalArgumentException();
               }
           
               return (IEclipsePreferences)Platform.getPreferencesService()
                 .getRootNode().node("dataset").node(this.uid).node(qualifier);
             }
           
             public boolean equals(Object obj)
             {
               if (this == obj)
                 return true;
               if (!(obj instanceof DataSetScope)) {
                 return false;
               }
               DataSetScope scope = (DataSetScope)obj;
               if (this.uid != null) {
                 return this.uid.equals(scope.uid);
               }
               return scope.uid == null;
             }
           
             public int hashCode()
             {
               return super.hashCode() + this.uid.hashCode();
             }
           }

